<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>医药管理系统</title>
    <link rel="stylesheet" href="../css/layui.css">
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">医药管理系统</div>
        <!-- 头部区域（可配合layui已有的水平导航） -->
        <ul class="layui-nav layui-layout-left">

        </ul>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="javascript:;" id="self">
                    <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
                    贤心
                </a>
            </li>
            <li class="layui-nav-item"><a href="/logout">退出</a></li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" lay-filter="test">
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;" data-href="/drug/index">药品管理</a>
                </li>
                <li class="layui-nav-item">
                    <a class="" href="javascript:;" data-href="/patient/patients1">药方结算</a>
                </li>
                <li class="layui-nav-item">
                    <a class="" href="javascript:;" data-href="/patient/patients">所有病患信息</a>
                </li>
                <li class="layui-nav-item">
                    <a class="" href="javascript:;" data-href="/doctor/doctors">所有医生信息</a>
                </li>
            </ul>
        </div>
    </div>

    <div class="layui-body">
        <!-- 内容主体区域 -->
        <div style="padding: 15px;" id="content">


        </div>
    </div>

</div>
<script src="../layui.js"></script>
<script>
    document.getElementById("self").innerHTML = window.sessionStorage.getItem("username")
    //JavaScript代码区域
    layui.use(['element', 'jquery'], function () {
        var element = layui.element;
        var $ = layui.jquery;
        $("#content").load("/drug/index");
        $("a").click(function () {
            var url = $(this).data("href");
            $("#content").load(url);
            console.log(url)

        });

    });
</script>
</body>
</html>